package com.ruoyi.common.entity.CoreEntity;
import com.ruoyi.common.entity.CoreEntity.store.StoreInfo;
import com.ruoyi.common.entity.TransactionEntity.Sku;
import com.ruoyi.common.entity.TransactionEntity.Spu;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;


/**
 * 门店商品库存：记录各门店各商品SKU的库存数量及状态（实时快照）对象 store_product_stock
 * 
 * @author yfk
 * @date 2025-08-07
 */
public class StoreProductStock extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 关联商户信息表id（逻辑外键，关联store_info.id） */
    @Excel(name = "关联商户信息表id", readConverterExp = "逻=辑外键，关联store_info.id")
    private Long storeInfoId;

    /** 商品SKU ID（逻辑外键，关联sku.id） */
    @Excel(name = "商品SKU ID", readConverterExp = "逻=辑外键，关联sku.id")
    private Long skuId;

    /** 当前库存数量 */
    @Excel(name = "当前库存数量")
    private Long stockQuantity;

    /** 锁定库存（待支付等场景占用） */
    @Excel(name = "锁定库存", readConverterExp = "待=支付等场景占用")
    private Long lockedQuantity;

    /** 库存状态（1正常，2缺货，3暂停销售） */
    @Excel(name = "库存状态", readConverterExp = "1=正常，2缺货，3暂停销售")
    private Long stockStatus;

    /** 库存预警阈值（低于此值时预警） */
    @Excel(name = "库存预警阈值", readConverterExp = "低=于此值时预警")
    private Long warningQuantity;

    /** 逻辑删除标志（0-未删除，1-已删除） */
    @Excel(name = "逻辑删除标志", readConverterExp = "0=-未删除，1-已删除")
    private String delFlag;

    private StoreInfo storeInfo;

    private Sku sku;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setStoreInfoId(Long storeInfoId) 
    {
        this.storeInfoId = storeInfoId;
    }

    public Long getStoreInfoId() 
    {
        return storeInfoId;
    }

    public void setSkuId(Long skuId) 
    {
        this.skuId = skuId;
    }

    public Long getSkuId() 
    {
        return skuId;
    }

    public void setStockQuantity(Long stockQuantity) 
    {
        this.stockQuantity = stockQuantity;
    }

    public Long getStockQuantity() 
    {
        return stockQuantity;
    }

    public void setLockedQuantity(Long lockedQuantity) 
    {
        this.lockedQuantity = lockedQuantity;
    }

    public Long getLockedQuantity() 
    {
        return lockedQuantity;
    }

    public void setStockStatus(Long stockStatus) 
    {
        this.stockStatus = stockStatus;
    }

    public Long getStockStatus() 
    {
        return stockStatus;
    }

    public void setWarningQuantity(Long warningQuantity) 
    {
        this.warningQuantity = warningQuantity;
    }

    public Long getWarningQuantity() 
    {
        return warningQuantity;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public StoreInfo getStoreInfo() {
        return storeInfo;
    }

    public void setStoreInfo(StoreInfo storeInfo) {
        this.storeInfo = storeInfo;
    }

    public Sku getSku() {
        return sku;
    }

    public void setSku(Sku sku) {
        this.sku = sku;
    }

    private Spu spu;

    public Spu getSpu() {
        return spu;
    }

    public void setSpu(Spu spu) {
        this.spu = spu;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("storeInfoId", getStoreInfoId())
            .append("skuId", getSkuId())
            .append("stockQuantity", getStockQuantity())
            .append("lockedQuantity", getLockedQuantity())
            .append("stockStatus", getStockStatus())
            .append("warningQuantity", getWarningQuantity())
            .append("delFlag", getDelFlag())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("storeInfo", getStoreInfo())
            .append("sku", getSku())
            .toString();
    }
}
